home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 026-050 / scopedisk45 / rexxarp21 / docs / rexxarplib.doc < prev    next >
Text File  |  1995-03-18  |  28KB  |  608 lines

  1.  
  2.  
  3.                    RexxArpLib.Library Version 2.1
  4.                    ==============================
  5.  
  6.                          Copyright (C) 1988
  7.                                 by
  8.                           W.G.J. Langeveld
  9.  
  10. Version 2.1:
  11. ------------
  12.  
  13.     New in version 2.1 are the general function ScreenColor, and the
  14. CreateHost-related functions ReadHost, SetGadget and IFFImage. The allowed
  15. flag for AddItem and AddSubItem is now a specific one (this is an "incompatible"
  16. change). CloseWindow now allows the host to stay around through a second
  17. argument. The window flag DELTAMOVE was added for OpenWindow, and the window
  18. location is now available in reports (%e and %f).
  19.     The function IFFImage needs some explanation. It allows you to display
  20. (a portion of) an IFF image in your CreateHost window. For the time being, this
  21. function makes use of the iff.library written by Christian Weber. However, there
  22. is a suspicion that this library may cause the occasional system crash, and it is
  23. known that DPaint-style brushes are not supported. Only straight IFF picture
  24. files are known to work more or less reliably. At some point I intend to use
  25. something else.
  26.  
  27. Version 2.0:
  28. ------------
  29.  
  30.     Originally, this library was supposed to be an ARexx interface to the
  31. ARP library. However, although it indeed interfaces to some of the ARP
  32. functions, it has become much more of an interface to various Intuition
  33. functions. I have considered renaming the library to something else, but by now
  34. everyone refers to it by this name, so I'll leave it like it is.
  35.     Version 2.0 is pretty much the final version. The library has grown
  36. considerably since the first release, and it is about as big as a library should
  37. ever get. If I find the need for a lot of other functions, they'll have to go
  38. into a different library.
  39.     The library contains over 50 functions now. One is Charlie's famous ARP
  40. file requester, another is a simple combination string/boolean requester that
  41. does auto-everything. All you have to do is specify the strings you want it to
  42. display. Then there are environment variable things, and a simple message window
  43. you can keep hanging around. On popular request, there is now a wildcard
  44. expander (not to be confused with a 'directory' function!) that uses the new Rexx
  45. Variables Interface (RVI).
  46.     The major new things though, are the interface routines to Intuition.
  47. You can now open screens and windows, add boolean and string gadgets to them as
  48. well as menus, draw lines and areas and circles and whatever. You can make your
  49. gadgets, menus, and windows send messages to wherever you like and you can 
  50. format those messages, though they have to ARexx messages, in any way you like,
  51. using any information that's currently available. All this is rather hard to
  52. explain. You'll really have to play with it and look at some examples.
  53.     As usual, this stuff is NOT public domain, but freely distributable.
  54.  
  55.     So have fun!
  56.  
  57.     Willy.
  58.  
  59.  
  60.  
  61. The functions are listed below.
  62. --------------------------------------------------------------------------------
  63.  
  64. GetFile
  65. =======
  66.  
  67.     Calling sequence:
  68.  
  69.     result = GetFile(x, y, pathname, filename, hailstring, publicscreen)
  70.  
  71.     x            = x coordinate of top-left corner of requester.
  72.     y            = y coordinate of top-left corner of requester.
  73.     pathname     = Default path name, first path name to be searched.
  74.         filename     = Default file name.
  75.         hailstring   = User instruction string.
  76.         result       = The selected path/file name
  77.         publicscreen = Name of a public screen (optional).
  78.  
  79.     All arguments are optional, but the order is fixed. Therefore if only
  80. the second or third argument is specified, it needs to be prefixed by
  81. sufficient commas.
  82.     The selected path concatenated with the selected file name are
  83. returned as 'result'. Notice, that the result is not necessarily an existing
  84. file. It is up to the user to ascertain that the result is suitable for his
  85. purposes. If the user hits "CANCEL", the result is an empty string. Notice
  86. that another way the result comes out to be empty is when the user leaves the
  87. requester hitting "OKAY" when both the path and file string gadgets are
  88. empty.
  89.     If 'publicscreen' is specified, the function will try to find the screen
  90. of that name. If it is set up properly, the requester will open on that 
  91. screen. If not, the requester will appear on the Workbench. The mechanism that
  92. is currently used for this is subject to change.
  93.  
  94. Request
  95. =======
  96.  
  97.     Calling sequence:
  98.  
  99.     result = Request(x, y, prompts, string, okaytext, canceltext, publicscreen)
  100.  
  101.     x             = x coordinate of top-left corner of requester.
  102.     y             = y coordinate of top-left corner of requester.
  103.         prompts       = A string which will be displayed above any gadgets.
  104.                         Any embedded '\' characters will be treated as a line
  105.                         break.
  106.         string        = The default string to be displayed in a string gadget.
  107.                         If omitted, no string gadget will be provided.
  108.     okaytext      = The text to be used for an Okay gadget.
  109.                     If omitted, no okay gadget will be provided.
  110.     canceltext    = The text to be used for a Cancel gadget.
  111.                     If omitted, no cancel gadget will be provided.
  112.         publicscreen  = Name of a public screen (optional).
  113.  
  114.     All arguments are optional, but the order is fixed. Therefore if
  115. only the second or third argument is specified, it needs to be prefixed by
  116. sufficient commas.
  117.     If a string gadget is present, but no okay gadget, the string
  118. will be returned after modification by the user in result when the user
  119. hits <return>.
  120.     If both a string gadget and an okay gadget are present, the string
  121. will be returned in result only when the user clicks on the okay gadget.
  122.     If no string gadget is present, clicking of the okay gadget (if 
  123. present) will cause the return in result of the string "OKAY".
  124.     In any case, if the user clicks either the cancel gadget or the
  125. close gadget, an empty string will be returned. Notice that another way the
  126. result comes out to be empty is when the user leaves the requester hitting
  127. "OKAY" when the string gadget is empty.
  128.     If 'publicscreen' is specified, the function will try to find the screen
  129. of that name. If it is set up properly, the requester will open on that 
  130. screen. If not, the requester will appear on the Workbench. The mechanism that
  131. is currently used for this is subject to change.
  132.  
  133. PostMsg
  134. =======
  135.  
  136.     This function sets up a window with text. It returns immediately to
  137. the caller. Subsequent calls will erase lines and fill them with new text.
  138. If a line has zero length, the line will NOT be erased. This has the advantage
  139. that you can change the text in a line without redisplaying text in another
  140. line. It has the disadvantage that in order to erase lines, you have to
  141. specify at least a single space for each line you want to erase.
  142. The window will remain open, until a call is made with too few arguments. 
  143. This is NOT a reentrant function: there is only one window pointer, and
  144. subsequent calls by ANY REXX process will affect the window.
  145.  
  146.     Calling sequence:
  147.  
  148.     result = PostMsg(x, y, strings, publicscreen)
  149.  
  150.     x             = x coordinate of top-left corner of requester.
  151.     y             = y coordinate of top-left corner of requester.
  152.         string        = A string which will be displayed above any gadgets.
  153.                         Any embedded '\' characters will be treated as a line
  154.                         break.
  155.     result        = 1 for success, 0 otherwise.
  156.         publicscreen  = Name of a public screen (optional).
  157.  
  158.     All arguments are optional, but the order is fixed. Therefore if
  159. only the second or third argument is specified, it needs to be prefixed by
  160. sufficient commas.
  161.     Examples:
  162.        Postmsg(50, 50, "This is line 1\This is line 2")
  163. will cause a window to appear with two lines of text. A subsequent call
  164.        Postmsg(50, 50, "\This is a new line 2")
  165. will cause the second line of the window to be replaced by the new text. The
  166. construct:
  167.        PostMsg(50, 50, " \")
  168. will erase the first line but leave the second one alone (notice the space).
  169.     If too few arguments are specified, this function will cause the
  170. window to be closed.
  171.     If 'publicscreen' is specified, the function will try to find the screen
  172. of that name. If it is set up properly, the requester will open on that 
  173. screen. If not, the requester will appear on the Workbench. The mechanism that
  174. is currently used for this is subject to change.
  175.  
  176. Getenv
  177. ======
  178.  
  179.     Calling sequence:
  180.  
  181.     result = Getenv(variable)
  182.  
  183.     variable   = Environment variable.
  184.         result     = The value of the environment variable.
  185.  
  186.     This function gets the value of an environment variable. If the
  187. variable does not exist, an empty string will be returned.
  188.  
  189. Setenv
  190. ======
  191.  
  192.     Calling sequence:
  193.  
  194.     result = Setenv(variable, valuestring)
  195.  
  196.     variable    = Environment variable.
  197.     valuestring = The new value for the environment variable.
  198.         result      = Always 1.
  199.  
  200.     This function (creates and) sets the environment variable to a
  201. a (new) value. If 'valuestring' is missing, the function will remove the
  202. environment variable.
  203.  
  204. ScreenToBack, ScreenToFront
  205. ===========================
  206.  
  207.     These functions depth arrange screens. If no argument is specified,
  208. the screen operated on is the Workbench screen. If the name of a public screen
  209. is specified, it will be affected.
  210.  
  211.     Calling sequence:
  212.  
  213.     result = screentoback(publicscreen)
  214.     result = screentofront(publicscreen)
  215.  
  216.         publicscreen  = Name of a public screen (optional).
  217.  
  218.     The argument is optional. If 'publicscreen' is specified, the function
  219. will try to find the screen of that name. If it is set up properly, the screen
  220. will be moved to the back/front. If not, the function will operate on the
  221. Workbench screen. The mechanism that is currently used for this is subject to
  222. change.
  223.  
  224. ScreenRows, ScreenCols, ScreenLace, ScreenColor
  225. ===============================================
  226.  
  227.     These functions retrieve info about screens. If no argument is
  228. specified, the screen operated on is the Workbench screen. If the name of a
  229. public screen is specified, it will be used.
  230.  
  231.     Calling sequences:
  232.  
  233.     result = ScreenRows(publicscreen)     /* return number of rows */
  234.     result = ScreenCols(publicscreen)     /* return number of columns */
  235.     result = ScreenLace(publicscreen)     /* return interlace */
  236.     result = ScreenColor(publicscreen, n) /* return color n */
  237.  
  238.         publicscreen  = Name of a public screen (optional).
  239.  
  240.     ScreenRows and ScreenCols retrieve the number of rows and columns in
  241. pixels. The function ScreenLace() returns 0 if the screen is not interlaced, and
  242. 1 if it is. The function returns -1 if the information could not be found.
  243. ScreenColor retrieves the RGB values of the selected color in the format:
  244. <red><space><green><space><blue>, e.g:   15 0 0  for an all red screen.
  245.     Except with ScreenColor, the first argument is optional.  If
  246. 'publicscreen' is specified, the function will try to find the screen of that
  247. name. If it is set up properly, information about the screen will be returned.
  248. If not, the function will operate on the Workbench screen. The mechanism that is
  249. currently used for this is subject to change. ScreenColor only operates on
  250. public screens.
  251.  
  252. OpenScreen, CloseScreen
  253. =======================
  254.  
  255.     These functions allow you to open public custom screens.
  256.  
  257.     Calling sequence:
  258.  
  259.     result = OpenScreen(topedge, depth, modes, defaulttitle, publicscreen)
  260.     result = CloseScreen(publicscreen)
  261.  
  262.     topedge       = Y coordinate of top edge of the screen.
  263.     depth         = Number of bitplanes.
  264.     modes         = Viewmodes and type of screen. The currently supported
  265.                         viewmodes are "HIRES", "LACE", and "HAM". The one
  266.                         currently supported type is "SCREENBEHIND".
  267.     defaulttitle  = Default title for the screen title bar.
  268.         publicscreen  = Name of a public screen (optional).
  269.  
  270.     result        = 0 on failure, 1 on success.
  271.  
  272.     The last argument is required, therefore you must supply sufficient
  273. commas and a name for the public screen to be created/closed. With openscreen,
  274. leaving out any of the other arguments will cause defaults to be used. They are
  275. topedge = 0, depth = 2, modes = 0 (meaning LORES, no LACE), and no default
  276. title. This is equivalent to specifying 0 for all arguments (a depth of 0 is
  277. illegal and will be changed to 2). All created screens are CUSTOM screens.
  278.     The mechanism that is currently used for public screens is subject to
  279. change.
  280.     ***NOTE: It is perfectly possible to apply closescreen() to another
  281. application's custom screen (if it is public, using the same conventions as
  282. used here). If you attempt this, a software failure is almost guaranteed. Only
  283. use closescreen() on screens you created using openscreen()!
  284.  
  285. FileList
  286. ========
  287.  
  288.     This function does ARP pattern matching. Given a pattern, it will
  289. return all files and/or directories matching the pattern.
  290.  
  291.     Calling sequence:
  292.  
  293.     number = FileList(pattern, files, flags)
  294.  
  295.     pattern       = a search pattern using ARP wildcards.
  296.         files         = the NAME of a stem variable to be created.
  297.         flags         = Directories - directories only. Files - files only.
  298.  
  299.     number        = the number of files matching the pattern.
  300.  
  301.     When files with names matching the  pattern are found, a stem variable
  302. with the name given by 'files' is created in the current Rexx context. It has
  303. fields 1, 2, ...., <number> containing the names of the files. The last argument
  304. is optional: when an F is specified, only files are listed. When a D is specified
  305. only directories are listed. Example: a simple directory program looks like
  306.  
  307.     /* Directory program, list everything */
  308.     arg pattern
  309.     if pattern = "" then pattern = "*"
  310.     numfils = FileList(pattern, myfilelist)
  311.     do i = 1 to numfils; say myfilelist.i; end
  312.     exit
  313.  
  314. CreateHost
  315. ==========
  316.  
  317.     This function allows you to create a single window with gadgets, menus,
  318. text, graphics, etc. Of course, multiple copies of the function may be started
  319. up to create more windows, but each must have a unique 'controlport'. This
  320. function should be started up asynchronously, using runwsh, and one should wait
  321. for the 'controlport' to appear using e.g. WaitForPort.
  322.  
  323.     Calling sequence:
  324.  
  325.     runwsh 'call CreateHost(controlport, notifyport, publicscreen)'
  326.  
  327.     controlport   = Name of the message port this window should listen to.
  328.     notifyport    = Name of the message port that should be notified when
  329.                         an IDCMP event occurs.
  330.         publicscreen  = Name of a public screen (optional).
  331.  
  332.     When the function is first called, it will open a message port with the
  333. name given by "controlport". The function will then wait for commands coming in
  334. through this port. This may be accomplished using one of many intuition
  335. functions, as explained later. One of the first commands should be to open the
  336. associated window by calling OpenWindow (see later). It will then open a window
  337. as specified in the OpenWindow call. If any message arrives through the IDCMP of
  338. this window, a REXX message will be sent to the port specified as "notifyport"
  339. which either you should set up in your rexx macro for this purpose, or should be
  340. an otherwise existing rexx message port belonging to another process. In the
  341. case you set up your own port, make sure the message is replied to after having
  342. been  retrieved and examined. If the  notifyport does not exist, no message will
  343. be sent. The window can be closed by the rexx macro by calling the function
  344. CloseWindow (see later). On startup, the notify port is the same for all classes
  345. of messages. This can be changed using the SetNotify() function, see later.
  346.     The last argument is optional.  If 'publicscreen' is specified, the
  347. function will try to find the screen of that name. If it is set up properly, the
  348. window will be opened on it. If not, the window will be opened on the Workbench
  349. screen. The mechanism that is currently used for this is subject to change.
  350.  
  351. Supported Intuition (and other) functions with createhost
  352. =========================================================
  353.  
  354.     The following functions are implemented as CreateHost functions. The 
  355. first argument is always the name of the control port of the host that is
  356. supposed to execute the command. A little secret: you can send commands
  357. *directly* to the controlport also by constructs like "Address controlport
  358. commandname". However, this only works for commands without further arguments.
  359. For example, from WShell, "address controlport CloseWindow" is equivalent to
  360. "call CloseWindow(controlport)". This can come in incredibly handy at times.
  361. For example, when you want command hosts to send message to themselves: you
  362. can tell a host to send IDCMP events of class CLOSEWINDOW to itself...
  363. Boggles the mind yet? Read on...
  364.  
  365.    call ActivateGadget(controlport, gadgetid)
  366.         Tries to activate a string gadget with id 'gadgetid'.
  367.  
  368.    call ActivateWindow(controlport)
  369.  
  370.    call AreaCircle(controlport, xcenter, ycenter, radius)
  371.  
  372.    call AreaDraw(controlport, x, y)
  373.         Only 100 vertices are currently allowed before each AreaEnd().
  374.  
  375.    call AreaEllipse(controlport, xcenter, ycenter, radius1, radius2)
  376.  
  377.    call AreaEnd(controlport)
  378.         Only 100 vertices are currently allowed before each AreaEnd().
  379.  
  380.    call AreaMove(controlport, x, y) 
  381.         Only 100 vertices are currently allowed before each AreaEnd().
  382.  
  383.    call AddGadget(controlport, x, y, gadgetid, gadgettext, messagetext, hsize)
  384.         If hsize is specified, this call creates a string gadget of that
  385.         horizontal size and gadgettext is the default string. If hsize is
  386.         not specified, this call creates an autosizing boolean gadget, where
  387.         the text in gadgettext is displayed. In both cases, the string in
  388.         messagetext is sent to controlport (see also under OpenWindow). As
  389.         usual, the gadgettext for boolean gadgets may contain \ characters
  390.         to cause multiple lines of text (See e.g. PostMsg()).
  391.  
  392.    call AddItem(controlport, itemname, message, commandchar, mutualexclude, flag)
  393.         Add a new item with name 'itemname'. Optionally, you may specify a
  394.         command key abbreviation (right-Amiga 'commandchar') and a mutual exclude
  395.         mask. See Intuition manual. A special value of the mutual exclude mask
  396.         is -1: this means that the item will be toggle selectable. If the flag
  397.         argument is "SAMELINE", the item will be on the same line as the previous
  398.         item, otherwise, or if the argument is not present, it will be on the 
  399.         next line.
  400.         See also AddMenu(), AddSubItem(), FreeMenu(), SetItem().
  401.  
  402.    call AddMenu(controlport, menuname)
  403.         Add a new menu with name 'menuname'. See also AddItem(), AddSubItem(),
  404.         FreeMenu(), SetItem().
  405.  
  406.    call AddSubItem(controlport,itemname,message,commandchar,mutualexclude,flag)
  407.         Add a new subitem with name 'itemname'. Optionally, you may specify a
  408.         command key abbreviation (right-Amiga 'commandchar') and a mutual exclude
  409.         mask. See Intuition manual. A special value of the mutual exclude mask
  410.         is -1: this means that the item will be toggle selectable. If the flag
  411.         argument is "SAMELINE", the item will be on the same line as the previous
  412.         item, otherwise, or if the argument is not present, it will be on the 
  413.         next line.
  414.         See also AddMenu(), AddItem(), FreeMenu(), SetItem().
  415.  
  416.    call BackFill(controlport)
  417.         This is not an intuition function. See OpenWindow().
  418.  
  419.    call CloseWindow(controlport, flag)
  420.         This function closes the window and deallocates all resources. The 'flag'
  421.         argument is optional. If present, and if the flag is equal to "CONTINUE",
  422.         the host will remain active. Otherwise, the host will exit.
  423.  
  424.    call Draw(controlport, x, y)
  425.  
  426.    call DrawCircle(controlport, xcenter, ycenter, radius)
  427.  
  428.    call DrawEllipse(controlport, xcenter, ycenter, radius1, radius2)
  429.  
  430.    call Exit(controlport)
  431.         This function closes the window, deallocates all resources and causes
  432.         the host to exit. Exit(), Quit() and Stop() are identical.
  433.  
  434.    call Flood(controlport, mode, x, y)
  435.         If mode is 0, the flood continues until pixels of the outline pen
  436.         color are found. If the mode is 1, the flood continues until pixels
  437.         of a different color than the pixel at x, y are found.
  438.  
  439.    call FreeMenu(controlport)
  440.         Gets rid of any attached menu.
  441.  
  442.    call IFFImage(controlport, filename, x, y, width, height)
  443.         Displays a chunk of size 'width', 'height' of an IFF ILBM file named
  444.         'filename' at x, y in the window. If x, y, width, and/or height are
  445.         omitted, suitable defaults are chosen. The colormap of the IFF file,
  446.         if any, is NOT used on the Workbench, but IS used on custom screens.
  447.  
  448.    call ModifyHost(controlport, IDCMPclass, messagestring)
  449.         This function allows you to set the message string that is sent to 
  450.         the notifyport for a particular class of IDCMP events. See OpenWindow.
  451.  
  452.    call Move(controlport, x, y)
  453.  
  454.    call OpenWindow(controlport, leftedge, topedge, width, height,
  455.                                 idcmp, flags, title)
  456.         width and height may be set to 0 to get the maximum size of the window.
  457.         idcmp is a string that specifies the IDCMP for the window. Supported are:
  458.  
  459.            IDCMP message    |  default arg[0]          
  460.         --------------------+-------------------
  461.           "CLOSEWINDOW"     |  "%l"            
  462.           "MOUSEBUTTONS"    |  "%l"            
  463.           "GADGETUP"        |  <its string>   
  464.           "GADGETDOWN"      |  <its string>   
  465.           "MENUPICK"        |  "%l"            
  466.           "NEWSIZE"         |  "%l"            
  467.           "VANILLAKEY"      |  "%l"            
  468.           "RAWKEY"          |  "%l"            
  469.           "NEWPREFS"        |  "%l"            
  470.           "DISKINSERTED"    |  "%l"            
  471.           "DISKREMOVED"     |  "%l"            
  472.           "ACTIVEWINDOW"    |  "%l"            
  473.           "INACTIVEWINDOW"  |  "%l"            
  474.           "REFRESHWINDOW"   |  "%l"            
  475.           "MOUSEMOVE"       |  "%l"            
  476.           "DELTAMOVE"       |  "%l"            
  477.  
  478.         Any number of these may be specified in the OpenWindow call, by conca-
  479.         tenation. When any of these messages arrives at the IDCMP, a REXX
  480.         message is created with a particular string in Arg[0]. This string is
  481.         by default the one given in the table above, after substitution has
  482.         taken place for any two-character sequence starting with '%'.
  483.         The following substitutions will be made:
  484.  
  485.         Sequence: | Typical Use: |     Meaning:
  486.         ----------+--------------+---------------
  487.             %%    |              | A single % sign
  488.             %a    | Vanillakeys  | 'Code' is interpreted as an ASCII character.
  489.             %b    | Buttons      | SELECTDOWN, SELECTUP, MENUDOWN, MENUUP.
  490.             %c    |              | 'Code' is given as an integer.
  491.             %d    | Gadgets      | the gadget id.
  492.             %e    | Window       | the TopEdge of the window
  493.             %f    | Window       | the LeftEdge of the window
  494.             %g    | Gadgets      | the string inside a string gadget goes here.
  495.             %h    | Newsize      | the window height.
  496.             %i    | Menus        | the item number.
  497.             %l    | Any          | the name of the IDCMP class.
  498.             %m    | Menus        | the menu number.
  499.             %q    |              | 'Qualifier' is given as an integer.
  500.             %s    | Menus        | the sub-item number.
  501.             %t    | Time         | the number of seconds since January 1 1980.
  502.             %w    | Newsize      | the window width.
  503.             %x    | Mouse        | the X position of the mouse pointer.
  504.             %y    | Mouse        | the Y position of the mouse pointer.
  505.           %0-%15  |              | which Arg to use.
  506.  
  507.         For example, if the message string of some gadget is
  508.  
  509.             "Mouse is %x, %y%3gadget string is %g"
  510.  
  511.         the following might be sent to the notifyport in Arg[0] when someone
  512.         hits return in that gadget, after typing "This is a test":
  513.  
  514.             Mouse is 320, 200
  515.  
  516.         while Arg[3] of the Rexx message would contain the string:
  517.  
  518.             gadget string is This is a test
  519.  
  520.         The default string for non-gadgets/menus is "%l", which means that they
  521.         only report their name. For example, if one would click in the window,
  522.         one would only receive a message with "MOUSEBUTTONS" in Arg[0]. However,
  523.         all arguments of the message that will be sent to the notifyport may be
  524.         changed using the ModifyHost() call, see there. Any of the escape
  525.         sequences above may be used in any string. Obviously, sometimes
  526.         particular sequences may not be very appropriate for certain uses.
  527.  
  528.         'flags' specifies the various window flags. Currently supported are:
  529.         "WINDOWCLOSE", "WINDOWSIZING" (and "SIZEBRIGHT", "SIZEBBOTTOM"),
  530.         "WINDOWDEPTH", "WINDOWDRAG", "BORDERLESS", "ACTIVATE" and
  531.         "NOCAREREFRESH".   A special flag can be set: "BACKFILL". It implies
  532.         a call to BackFill() after opening the window. It sets the window's
  533.         background to the current requester-style background color.
  534.  
  535.    call Quit(controlport)
  536.         This function closes the window, deallocates all resources and causes
  537.         the host to exit. Exit(), Quit() and Stop() are identical.
  538.  
  539.    call ReadGadget(controlport, gadgetid)
  540.         This function will cause the gadget 'gadgetid' to send its message
  541.         text (after substitutions, of course).
  542.  
  543.    call ReadHost(controlport, notifyport, messagetext)
  544.         This function will cause the message text (after substitutions, of
  545.         course) to be sent to the notifyport.
  546.  
  547.    call RectFill(controlport, xmin, ymin, xmax, ymax) 
  548.  
  549.    call RefreshGadgets(controlport)
  550.  
  551.    call RemoveGadget(controlport, gadgetid)
  552.  
  553.    call SetAPen(controlport, pennumber)
  554.  
  555.    call SetBPen(controlport, pennumber)
  556.  
  557.    call SetDrMd(controlport, mode)
  558.         mode can be any of JAM1, JAM2, INVERSVID or COMPLEMENT.
  559.  
  560.    call SetDrPt(controlport, pattern)
  561.         pattern is interpreted as a long integer of which the bits form the
  562.         pattern.
  563.  
  564.    call SetFont(controlport, FontName, FontSize)
  565.  
  566.    call SetGadget(controlport, gadgetid, action)
  567.         Given a gadget id, perform action on the gadget. Supported are ON and
  568.         OFF, to set or clear the highlighting state of the gadget.
  569.  
  570.    call SetItem(controlport, menunumber, itemnuber, subitemnumber, action)
  571.         Given menu, item (and optionally subitem) numbers, perform action on
  572.         the menu item. Supported are ON and OFF, to set or clear the check mark.
  573.  
  574.    call SetNotify(controlport, IDCMPclass, newnotifyport)
  575.         This function allows you to change the name of the NotifyPort that 
  576.         message strings are sent to for a particular class of IDCMP events.
  577.  
  578.    call SetReqColor(controlport, pentype, colornumber)
  579.         This function allows you to change the color number assigned to
  580.         one of the various pentypes. Currently the pentypes are: BLOCKPEN,
  581.         DETAILPEN, BACKGROUNDPEN, PROMPTPEN, BOXPEN, SHADOWPEN, OKAYPEN,
  582.         and CANCELPEN.
  583.  
  584.    call SetOPen(controlport, pennumber)
  585.  
  586.    call SetRGB4(controlport, pennumber, red, green, blue)
  587.         red, green and blue are values for the RGB content of the color to be
  588.         assigned to the pen. The values are taken mod 16.
  589.  
  590.    call Stop(controlport)
  591.         This function closes the window, deallocates all resources and causes
  592.         the host to exit. Exit(), Quit() and Stop() are identical.
  593.  
  594.    call Text(controlport, string) 
  595.  
  596.    call WindowText(controlport, text)
  597.         The string in text may contain \'s to indicate multiple lines of text.
  598.  
  599.    call WindowToBack(controlport)
  600.  
  601.    call WindowToFront(controlport)
  602.  
  603.    call WritePixel(controlport, x, y)
  604.  
  605.  
  606.  
  607.  
  608.